﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DemountCIM.Framework.DataBase.Table
{
    [SugarTable("tb_user")]
    public class TbUser
    {
        public TbUser()
        {
            Level = UserLevel.无效;
        }

        [SugarColumn(ColumnName = "id", IsIdentity = true, IsPrimaryKey = true)]
        public int Id { get; set; }

        [SugarColumn(ColumnName = "name", ColumnDataType = "varchar(100)")]
        public string Name { get; set; }

        [SugarColumn(ColumnName = "password", ColumnDataType = "varchar(500)")]
        public string Pwd { get; set; }

        [SugarColumn(ColumnName = "level")]
        public UserLevel Level { get; set; }

        [SugarColumn(ColumnName = "role")]
        public int Role { get; set; }
    }

    public enum UserLevel
    {
        管理员,
        工程师,
        操作工,
        无效,
    }
}
